<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

Route::get('api/:version/banner/all', 'api/:version.Banner/getBanner');
//Route::get('api/:version/update/', 'api/:version.Banner/update');

Route::get('api/:version/theme', 'api/:version.Theme/getSimpleList');
Route::get('api/:version/theme/:id', 'api/:version.Theme/getComplexOne');

//Route::get('api/:version/product/recent', 'api/:version.Product/getRecent');
//Route::get('api/:version/product/by_category', 'api/:version.Product/getAllInCategory');
//Route::get('api/:version/product/:id', 'api/:version.Product/getOne',[],['id'=>'\d+']);

Route::group('api/:version/product',function(){
    Route::get('/all', 'api/:version.Product/getAll');
    Route::get('/highPerice', 'api/:version.Product/highPerice');
    Route::get('/by_category/:id', 'api/:version.Product/getAllInCategory');
    Route::get('/lowPerice', 'api/:version.Product/lowPerice');
    Route::get('/highNum', 'api/:version.Product/highNum');
    Route::get('/lowNum', 'api/:version.Product/lowNum');
    Route::get('/getProductReAll', 'api/:version.Product/getProductReAll');
    Route::post('/searchProduct', 'api/:version.Product/searchProduct');
    Route::get('/:id', 'api/:version.Product/getOne',[],['id'=>'\d+']);

});

Route::get('api/:version/category/all', 'api/:version.Category/getAllCategory');


//用户登陆
Route::post('api/:version/user/login', 'api/:version.User/login');
Route::post('api/:version/user/userRegister', 'api/:version.User/userRegister');
Route::post('api/:version/user/checkPhone', 'api/:version.User/checkPhone');
Route::post('api/:version/user/sanjiUser', 'api/:version.User/sanjiUser');
Route::post('api/:version/user/erjiUser', 'api/:version.User/erjiUser');
Route::post('api/:version/user/setUserInfo', 'api/:version.User/setUserInfo');
Route::post('api/:version/user/setUserLogo', 'api/:version.User/setUserLogo');
Route::get('api/:version/user/getWchatQrcode', 'api/:version.User/getWchatQrcode');
Route::post('api/:version/user/getUserIncome', 'api/:version.User/getUserIncome');
Route::post('api/:version/user/getUserInfo', 'api/:version.User/getUserInfo');
Route::post('api/:version/user/addAlipay', 'api/:version.User/addAlipay');
Route::post('api/:version/user/addBank', 'api/:version.User/addBank');
Route::post('api/:version/user/userAliInfo', 'api/:version.User/userAliInfo');
Route::post('api/:version/user/deleteAliPay', 'api/:version.User/deleteAliPay');
Route::post('api/:version/user/userBankInfo', 'api/:version.User/userBankInfo');
Route::post('api/:version/user/deleteBankPay', 'api/:version.User/deleteBankPay');
Route::post('api/:version/user/userTxAliOrder', 'api/:version.User/userTxAliOrder');
Route::post('api/:version/user/userTxBankOrder', 'api/:version.User/userTxBankOrder');
Route::post('api/:version/user/userTxLists', 'api/:version.User/userTxLists');
Route::post('api/:version/user/sendRegisterCode', 'api/:version.User/sendRegisterCode');
Route::post('api/:version/user/sendPasswordCode', 'api/:version.User/sendPasswordCode');
Route::post('api/:version/user/updateUserPassword', 'api/:version.User/updateUserPassword');
